function $(id) {
    return typeof id === "string" ? document.getElementById(id):null;
}
window.onscroll=function () {
    let scrollTop=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0;
    if(scrollTop>300){
        $("backtop").style.display="block";
    }else
    {
        $("backtop").style.display="none";
    }
};

let gywm=Vue.extend({
    template:'#gywm'
});
let lxwm=Vue.extend({
    template:'#lxwm'
});
let fltk=Vue.extend({
    template:'#fltk'
});
let tkgz=Vue.extend({
    template:'#tkgz'
});
let fpsq=Vue.extend({
    template:'#fpsq'
});
let bzzx=Vue.extend({
    template:'#bzzx'
});
let routes=[
    {path:'/foo1',component:gywm},
    {path:'/foo2',component:lxwm},
    {path:'/foo3',component:fltk},
    {path:'/foo4',component:tkgz},
    {path:'/foo5',component:fpsq},
    {path:'/foo6',component:bzzx},
    {path:'/',redirect:'/foo1'}
];
let router=new VueRouter({
    routes:routes
});
new Vue({
    router:router
}).$mount("#aboutours");